import Vue from 'vue'
import VueRouter from 'vue-router'
import PATH from '../router/cons';//封装路由

Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'Home',
    component: () => import('../views/Home.vue'),
    meta:{
      footer:true
    }
  },
  { //砍价列表
    path: '/bargain',
    name: 'bargain',
    component: () => import('../components/bargain/Bargain.vue'),
    meta:{
      footer:true
    }
  },
  { //严选专栏
    path: '/About',
    name: 'About',
    component: () => import('../components/about/About.vue'),
    meta:{
      footer:true
    }
  },
  { //专题详情
    path: '/Special_detail',
    name: 'Special_detail',
    component: () => import('../components/about/Special_detail.vue'),
    meta:{
      footer:true
    }
  },
  { //专栏详情
    path: '/Jump',
    name: 'Jump',
    component: () => import('../components/about/Jump.vue'),
    meta:{
      footer:true
    }
  }, 
  { //个人立即登录
    path: '/PATH.USER',
    name: 'user',
    component: () => import('../views/user.vue'),
    meta:{
      footer:true
    }
  }, 
  { //登录
    path: '/loginpage',
    name: 'loginpage',
    component: () => import('../views/loginpage.vue'),
    meta:{
      footer:false
    }
  }, 
  { //新用户注册
    path: '/register',
    name: 'register',
    component: () => import('../views/register.vue'),
    meta:{
      footer:false
    }
  },
  { // 地址
    path: '/address',
    name: 'address',
    component: () => import('../views/address.vue'),
    meta:{
      footer:false
    }
  },
  { // 新增地址
    path: '/newaddress',
    name: 'newaddress',
    component: () => import('../views/newaddress.vue'),
    meta:{
      footer:false
    }
  },
  { //分类
    path: '/PATH.FENLEI',
    name: 'Classify',
    component: () => import('../views/fenlei/Classify.vue'),
    meta:{
      footer:true
    }
  },
  { //分类
    path: '/PATH.CLASSIFY_LIST',
    name: 'Classify_detal',
    component: () => import('../views/fenlei/Classify_detal.vue'),
    meta:{
      footer:false
    }
  },
  { //购物车
    path: '/PATH.GOUWUCHE',
    name: 'shopping_cart',
    component: () => import('../views/shopping_cart.vue'),
    meta:{
      footer:true
    }
  },
  { //人齐推荐详情页
    path: '/Recommend_detail',
    name: 'Recommend_detail',
    component: () => import('../components/about/Recommend_detail.vue'),
    meta:{
      footer:false
    }
  },
  { //点击人气展示商品详情
    path: '/Recommend_list',
    name: 'Recommend_list',
    component: () => import('../components/about/Recommend_list.vue'),
    meta:{
      footer:false
    }
  },
]

const router = new VueRouter({
  routes
})

export default router